import xls from 'xlsx';
import fs from 'fs';


let sheetLen;
const workbook = xls.readFile('config.xlsx');
sheetLen = workbook.SheetNames.length;


for (let i = 0; i < sheetLen; i++) {
    let sheetName = workbook.SheetNames[i];
    trimSheet(workbook.Sheets[name]);
}



function trimSheet(sheet) {
    for (let k in sheet) {
        if (k.indexOf("!") < 0 && sheet[k].v && typeof sheet[k].v === "string") {
            sheet[k].v = sheet[k].v.trim();
        }
    }
}